home *** CD-ROM | disk | FTP | other *** search
/ Crosscountry USA Photo Safari / Crosscountry USA Photo Safari.iso / Data / safari_usa / pak00_16bit_f.pk3 / tutorial / tutorial.gl.p
Text File  |  2004-01-21  |  4KB  |  119 lines

  1. {
  2.   ChildID = {
  3.     GuiAnimation("background") {
  4.       AnimationID = "tutorial/image/background.jpg";
  5.       X = 0;
  6.       Y = 0;
  7.       },
  8.       
  9.     GuiButton("prev_button") {
  10.       X = 350;
  11.       Y = 442;
  12.       TextID = Mangle(65634/*"Back"*/);
  13.       StyleID = "gui/bs/square.gbs";
  14.       FontID = "font/square_black_on_gray_9.tf";
  15.       Width = 120;
  16.       AutoSize = HEIGHT;
  17.       ScriptID = Script {   
  18.         @activate {
  19.          if (CVarGetInt("cur_step") == 1) {
  20.            stop;
  21.          }  
  22.          CVarSetInt("cur_step",CVarGetInt("cur_step") - 1);
  23.          ResParseEvent(GuiSiblingByName("step"),"@narrate");
  24.         }
  25.       };      
  26.     },
  27.     GuiButton("next_button") {
  28.       X = 480;
  29.       Y = 442;
  30.       TextID = Mangle(65609/*"Next"*/);
  31.       StyleID = "gui/bs/square.gbs";
  32.       FontID = "font/square_black_on_gray_9.tf";
  33.       Width = 120;
  34.       AutoSize = HEIGHT;
  35.       ScriptID = Script {   
  36.         @activate {
  37.          if (CVarGetInt("cur_step") == 10) {
  38.            stop;
  39.          }        
  40.            
  41.          CVarSetInt("cur_step",CVarGetInt("cur_step") + 1);
  42.          ResParseEvent(GuiSiblingByName("step"),"@narrate");         
  43.         }
  44.       };
  45.     },   
  46.           
  47.     GuiAnimation("step") {
  48.       AnimationID = "tutorial/image/step_1.jpg";
  49.       X = 87;
  50.       Y = 41;
  51.       ScriptID = Script {
  52.         @loaded {
  53.           CVarSetInt("cur_step",1);
  54.           ResParseEvent(SELF,"@narrate");   
  55.         }
  56.         @narrate {       
  57.         
  58.           if (CVarGetInt("cur_step") == 1) {
  59.             ResPropSetInt(GuiSiblingByName("prev_button"),"Hidden",TRUE);  
  60.           } else {
  61.             ResPropSetInt(GuiSiblingByName("prev_button"),"Hidden",FALSE);  
  62.           } 
  63.           
  64.           if (CVarGetInt("cur_step") == 10) {
  65.             ResPropSetInt(GuiSiblingByName("next_button"),"Hidden",TRUE);  
  66.           } else {
  67.             ResPropSetInt(GuiSiblingByName("next_button"),"Hidden",FALSE);  
  68.           }           
  69.           
  70.           ResPropSetResID(GuiSiblingByName("step"),"AnimationID",ResByName(StrFormatStr("tutorial/image/step_%d.jpg",CVarGetInt("cur_step"))));
  71.           AudioStop(CVarGetInt("tutorial_sound_id"));
  72.           CVarSetInt("tutorial_sound_id", AudioPlay(ResByName(StrFormatStr("tutorial/sound/step_%d.wav",CVarGetInt("cur_step")))));
  73.         }
  74.       };      
  75.       },      
  76.     GuiAnimation("frog") {
  77.       AnimationID = "tutorial/frog_talking/frog.anm";
  78.       X = 0;
  79.       Y = 411;   
  80.       ScriptID = Script {
  81.         @animate {
  82.           resid Talking;
  83.           resid Waiting;
  84.           
  85.           Talking = ResByName("tutorial/frog_talking/frog.anm");
  86.           Waiting = ResByName("tutorial/frog_waiting/frog.anm");
  87.           
  88.           if (AudioIsPlaying(CVarGetInt("tutorial_sound_id"))) {
  89.             if (ResPropGetResID(SELF,"AnimationID") != Talking) {
  90.               ResPropSetResID(SELF,"AnimationID",Talking);
  91.             }
  92.           } else {
  93.             if (ResPropGetResID(SELF,"AnimationID") != Waiting) {
  94.               ResPropSetResID(SELF,"AnimationID",Waiting);
  95.             }          
  96.           }
  97.  
  98.         }
  99.       };        
  100.       },    
  101.     GuiButton("main_menu_button") {
  102.       X = 100;
  103.       Y = 442;
  104.       TextID = Mangle(65610/*"Main Menu"*/);
  105.       StyleID = "gui/bs/square.gbs";
  106.       FontID = "font/square_black_on_gray_9.tf";
  107.       Width = 160;
  108.       AutoSize = HEIGHT;
  109.       ScriptID = Script {
  110.         @activate {
  111.           release("floor");
  112.           mark("floor");
  113.           ResByName("splash_screen.gl");
  114.         }
  115.       };
  116.     }
  117.   };
  118. }
  119.